<?php
class Nutri_Model_Mapper_Menu extends Nutri_Model_Mapper_Abstract
{
    protected $_dbTable;

    public function getDbTable()
    {
        if (null === $this->_dbTable) {
            $this->setDbTable('Nutri_Model_DbTable_Menu');
        }
        return $this->_dbTable;
    }
	
	protected function _beforeSave(array &$data)
    {
    	$date = new Zend_Date();
		if(!empty($data['enddate']))
		{
			$date->set($data['enddate']);
        	$data['enddate'] = $date->toString(Zend_Date::ISO_8601);
		}
        parent::_beforeSave($data);
    }
}